<?php
/**
 * @Author:      zhaoyang
 * @DateTime:    2018-1-30 
 * @Description: PMS 采购单
 */
class PMSOrder extends Eloquent
{
    protected $table = "pms_order";
    protected $primaryKey = "pms_code";

    public static $source = [1=>'门店(SCE)', 2=>'采购平台(PMS)'];
    public static $type = ['1'=>'集采','2'=>'自采'];
    public static $status = [1=>'计划中',2=>'审核中',3=>'驳回',4=>'采购中',5=>'待收货',6=>'完成',0=>'取消'];

    //审核人
    public function approve_by(){
        return $this->belongsTo('PMSUser','approve_by','id');
    }
    
}